import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";

@Entity("official_user", { schema: "chat" })
export class OfficialUser {
  @PrimaryGeneratedColumn({ type: "int", name: "id", unsigned: true })
  id: number;

  @Column("varchar", {
    name: "im_user_id",
    length: 15,
    default: () => "'用户id'",
  })
  imUserId: string;

  @Column("varchar", { name: "name", length: 50 })
  name: string;

  @Column("varchar", { name: "avatar", length: 200 })
  avatar: string;

  @Column("tinyint", {
    name: "type",
    comment: "1:客服，2：公告",
    unsigned: true,
    default: () => "'0'",
  })
  type: number;

  @Column("int", { name: "create_time", unsigned: true, default: () => "'0'" })
  createTime: number;
}
